package designpattern.Builder.demo01;

/**
 * @author cyt
 * @create 2020-04-24 14:18
 */

// 继承抽象类
public class Worker extends builder {

    Product product;

    public Worker() {
        this.product = new Product();
    }


    @Override
    void builderA() {
        product.setBuilderA("步骤A");
        System.out.println("步骤A");
    }

    @Override
    void builderB() {

        product.setBuilderB("步骤B");
        System.out.println("步骤B");
    }

    @Override
    void builderC() {

        product.setBuilderC("步骤C");
        System.out.println("步骤C");
    }

    @Override
    void builderD() {

        product.setBuilderD("步骤D");
        System.out.println("步骤D");
    }

    @Override
    Product getProduct() {
        return product;
    }
}
